<template>
  <div>
    <el-dialog title="新增员工" :visible="showDialog" :before-close="handleClose">
      <!-- 表单 -->
      <div>手机的法律SD卡雷锋精神</div>
      <!-- footer插槽 -->
      <template v-slot:footer>
        <el-button @click="handleClose">取消</el-button>
        <el-button type="primary" @click="handleSubmit">确定</el-button>
      </template>
    </el-dialog>
  </div>
</template>
<script>
export default {
  props: {
    showDialog: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    handleClose () {
      console.log(7);
    },
    handleSubmit () {
      console.log(123);
      this.$emit('update:showDialog', false)
    }
  }
}
</script>
